/*
 * @Description: 责任区域设置
 * @Author: wind-lc
 * @version: 1.0
 * @Date: 2021-09-14 16:28:36
 * @LastEditTime: 2021-09-29 11:36:37
 * @FilePath: \cscec-pms-admin\src\api\project\responsibilityAreaSetting.js
 */
import request2 from '@/utils/request2'
import { projectApiUrl } from '@/api/config'
export default {
  /**
   * @description: 组织架构区域查询
   * @param {Object} data 接口参数
   * @return {Promise} 接口Promise
   */
  queryList: data => {
    return request2({
      url: projectApiUrl + '/dutyArea/queryList',
      method: 'post',
      data
    })
  },
  /**
   * @description: 查询区域树
   * @param {Object} data 接口参数
   * @return {Promise} 接口Promise
   */
  dutyAreaSettingDetail: data => {
    return request2({
      url: projectApiUrl + '/dutyArea/dutyAreaSettingDetail/' + data,
      method: 'get'
    })
  },
  /**
   * @description: 新增区域设置
   * @param {Object} data 接口参数
   * @return {Promise} 接口Promise
   */
  addDutyAreaSetting: data => {
    return request2({
      url: projectApiUrl + '/dutyArea/addDutyAreaSetting',
      method: 'post',
      data
    })
  },
  /**
   * @description: 编辑区域设置
   * @param {Object} data 接口参数
   * @return {Promise} 接口Promise
   */
  updateDutyAreaSetting: data => {
    return request2({
      url: projectApiUrl + '/dutyArea/updateDutyAreaSetting',
      method: 'post',
      data
    })
  },
  /**
   * @description: 删除区域设置
   * @param {Object} data 接口参数
   * @return {Promise} 接口Promise
   */
  deleteDutyAreaSetting: data => {
    return request2({
      url: projectApiUrl + '/dutyArea/deleteDutyAreaSetting',
      method: 'post',
      data
    })
  },
  /**
   * @description: 查询项目下人员
   * @param {Object} data 接口参数
   * @return {Promise} 接口Promise
   */
  queryProjectEmployees: data => {
    return request2({
      url: projectApiUrl + '/project-common/query-project-employees',
      method: 'post',
      data
    })
  },
  /**
   * @description: 修改责任人
   * @param {Object} data 接口参数
   * @return {Promise} 接口Promise
   */
  updateDutyPersonSetting: data => {
    return request2({
      url: projectApiUrl + '/dutyArea/updateDutyPersonSetting',
      method: 'post',
      data
    })
  },
  /**
   * @description: 新增责任人
   * @param {Object} data 接口参数
   * @return {Promise} 接口Promise
   */
  addDutyPersonSetting: data => {
    return request2({
      url: projectApiUrl + '/dutyArea/addDutyPersonSetting',
      method: 'post',
      data
    })
  },
  /**
   * @description: 删除责任人
   * @param {Object} data 接口参数
   * @return {Promise} 接口Promise
   */
  deleteDutyPersonSetting: data => {
    return request2({
      url: projectApiUrl + '/dutyArea/deleteDutyPersonSetting',
      method: 'post',
      data
    })
  },
  /**
   * @description: 表格统计
   * @param {Object} data 接口参数
   * @return {Promise} 接口Promise
   */
  queryStatistics: data => {
    return request2({
      url: projectApiUrl + '/dutyArea/queryStatistics',
      method: 'post',
      data
    })
  }
}
